import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/pages/home/home.vue'
import City from '@/pages/city/City.vue'
import Detail from '@/pages/detail/Detail.vue'
import Login from '@/pages/login/login.vue'
import Register from '@/pages/register/register.vue'
import Recommend from '@/pages/recommend/Recommend.vue'
import RecommendEdit from '@/pages/recommend/components/Edit.vue'
import Weekend from '@/pages/weekend/weekend.vue'
import Swiper from '@/pages/swiper/Swiper.vue'
import Control from '@/pages/control/control.vue'

Vue.use(Router)

/* eslint-disable */
export default new Router({
    routes: [{
        path: '/',
        name: 'Hello',
        component: Home
    }, {
        path: '/city',
        name: 'City',
        component: City
    }, {
        path: '/detail/:recommendId',
        name: 'Detail',
        component: Detail
    }, {
        path: '/register',
        name: 'Register',
        component: Register
    }, {
        path: '/login',
        name: 'Login',
        component: Login
    }, {
        path: '/recommend',
        name: 'Recommend',
        component: Recommend
    }, {
        path: '/recommend/edit',
        name: 'RecommendEdit',
        component: RecommendEdit
    }, {
        path: '/weekend',
        name: 'Weekend',
        component: Weekend
    }, {
        path: '/swiper',
        name: 'Swiper',
        component: Swiper
    }, {
        path: '/control',
        name: 'Control',
        component: Control
    }],
    scrollBehavior(to, from, savedPosition) {
        return { x: 0, y: 0 }
    }
})